class template specialization
<array>
std::tuple_element<array>
template <size_t I, class Tpl> class tuple_element; // unspecialized
template <size_t I, class T, size_t N>
struct tuple_element <I, array<T,N>>; // array specialization
Tuple element type for array
Accesses the static type of the elements in an array object as if it was a tuple.
This class specialization simply provides a member type, which aliases T, as if defined as:
1 2 3 4 5
|
template <size_t I, class Tpl> class tuple_element;
template <size_t I, class T, size_t N> struct tuple_element <I, array<T,N>>
{
typedef T type;
};
| |
See tuple_element for more information.
Template parameters
- I
- Order number of the element within the array (zero-based).
All elements in an array object have the same static type, and thus this is not relevant for this specialization. But a program is ill-formed if I>=N.
size_t is an unsigned integral type.
- Tpl
- Tuple-like type: array<T,N>.
- T
- Type of the elements contained.
Aliased as member type.
- N
- Size of the array, in terms of number of elements.
Member types
member type | definition |
type | T (the type of the elements contained in the array).
|